1. Field of the Invention
The present invention relates to an image processing device, an image processing method, and a recording medium. In particular, the present invention relates to an image processing device for correcting defect portions in an image represented by image information, an image processing method that can be applied to the image processing device, and a recording medium on which is recorded a program for enabling a computer to function as the image processing device.
2. Description of the Related Art
Because of the handling thereof, sometimes the emulsion surface and the back surface (i.e. the rear surface of the emulsion surface) of a photographic film become scratched. If scratches are formed within locations corresponding to the image recording area of a photographic film, and if an attempt is made to output (i.e. by recording the image on an image recording material such as photographic paper or the like, or by displaying the image on a display apparatus such as a display unit or the like) an image recorded on the scratched photographic film, then, depending on the extent of the scratching, the scratches formed on the photographic film are often clearly visible on the output image as defect portions such as low density streaks or white streaks. Moreover, if foreign matter such as dust or the like becomes attached to the surface of a photographic film, the foreign matter is clearly visible as a defect portion.
In order to try and prevent scratches on a photographic film in a surface exposure type of photographic printing apparatus that performs exposure recording of an image onto photographic paper by irradiating light onto a photographic film and irradiating the light transmitted through the photographic film onto photographic paper, a diffusion plate is positioned between the light source and the photographic film and the light scattered by the diffusion plate is irradiated onto the photographic film. However, in this technology, it is difficult to eliminate defect portions in an output image (i.e. in an image recorded by exposure on photographic paper), and the defect portions are simply reduced slightly (i.e. made less visible).
A technology applicable to an image reading device structured so as to read an image recorded on a photographic film using a reading sensor such as a CCD or the like is disclosed in Japanese Patent Application Laid-Open (JP-A) No. 11-75039. In this technology, each photographic film is read in each of at least four wavelength regions including visible light regions of three wavelengths and a non-visible light region of one wavelength (e.g. the infrared region or the ultraviolet region). Then, based on the information obtained from the reading in the non-visible light region, the image information obtained from the readings in the visible light regions is corrected.
The amount of transmitted light in the visible light regions changes in accordance with the density of the image recorded on the photographic film. In addition, the amount of transmitted light is also changed by portions of the light being refracted or reflected due to the scratching or foreign matter in those locations on the photographic film where scratching or foreign matter are present. In contrast, although the amount of transmitted light in the non-visible light regions changes in those locations where scratching or foreign matter are present on the photographic film, it is not affected by the density of the image recorded on the photographic film.
As a result, according to the technology disclosed in the above publication, scratching and foreign matter present on the photographic film are detected from the changes in the amount of transmitted light in the non-visible light regions, and it becomes possible to correct variations in the amount of transmitted light in the visible regions caused by scratching and foreign matter present on the surface of the photographic film. Namely, it becomes possible to amend defect portions of an image (i.e. of an image represented by image information obtained by the readings in the visible light regions) created by scratching or foreign matter present on the surface of the photographic film.
Various correction methods can be considered as the correction method (correction algorithm) for correcting the defect portions. Examples of these include a correction method in which a defect portion is corrected using interpolation to decide the brightness and density of the defect portion from information of the area surrounding the defect portion (an interpolation method); a correction method in which a defect portion of an image is corrected by adjusting the brightness of the defect portion area (brightness adjustment method); and a correction method in which a defect is corrected by vignetting defect portions by reducing high frequency components of the spatial frequency in the defect portion and the areas around the defect portion (vignetting method).
However, each one of these correction methods has a weak point. Namely, in the interpolation method, because interpolation is performed from changes in the density in the surrounding area adjacent to the defect portion with it being assumed that the density of the original image changes smoothly and continuously between the defect portion and the surrounding area adjacent to the defect portions, then if, for example, the change in the density is originally complex within the defect portion, the accuracy of the interpolation calculation is low (i.e. the accuracy with which the density of the original image is reproduced) and in some cases the result of the correction is somewhat inappropriate and gives a sense of incongruity to the person looking at the output result.
Moreover, when correcting defect portions using the interpolation method, the accuracy of the correction varies greatly depending on in which direction out of all the areas surrounding the defect portion (i.e. the interpolation direction) the area having the information used to perform the interpolation is present. Because the proper interpolation direction enabling the defect portion to be properly corrected is different depending on the defect portion, there is a drawback that there is a great amount of unevenness in the accuracy of the correction depending on the defect portion to be corrected.
Moreover, the color of a defect portion caused, for example, by foreign matter present on the photographic film or by scratching on the emulsion surface side of the photographic film in the image data obtained by reading an image recorded on the photographic film is often different from the color of that portion of the subject recorded by photography on the photographic film that corresponds to the defect portion. In contrast to this, because the brightness adjustment method only adjusts the brightness and does not change the color of a defect portion, it is difficult using this method to accurately correct defect portions such as those described above.
Furthermore, in the brightness adjustment method, the amount of brightness adjustment is decided based on changes in the amount of transmitted light in the non-visible light region in the region surrounding the defect portion. However, due to reasons such as the refractive indexes varying depending on the wavelength of the light because of scratching on the photographic film and the like, the changes in the amount of transmitted light in the non-visible light region in the region surrounding the defect portion usually varies slightly from the changes in the amount of transmitted light in the visible light regions caused by scratching and the like in the region surrounding the defect portion. Consequently, even if a defect portion is corrected in accordance with an amount of brightness adjustment decided on the basis of the change in the amount of transmitted light in the non-visible light region, this variation in the change of the amount of the transmitted light, for example, may remain as a minute defect portion.
In the vignetting method, because the defect portions are vignetted by reducing high frequency components of the spatial frequency in the defect portion and the area surrounding the defect portions, this method is not suitable for correcting defect portions caused by deep scratches or by the presence of comparatively large-sized foreign matter. Namely, in order to correct defect portions such as these, it is necessary to enlarge the degree of vignetting of the defect portions which tends to lower the image quality of the image. As can thus be seen, no matter which of the various correction methods described above is used, it is difficult to correct with any accuracy all of the varied types of defect portions which all have different features to each other.
Even when cells in which the relationship between the amount of incident light and the output signal is different from the initial relationship (i.e. so-called defect pixels) are present in a multiplicity of photoelectric conversion cells of the photoelectric conversion elements of a CCD or the like built into a digital still camera (referred to below as a digital camera), the same type of defect portions are created in an image represented by image data obtained by the image pickup of a subject as the defect portions caused by foreign matter or scratching on a photographic film. It is possible to correct these defect portions in the same way as the defect portions caused by foreign matter and scratching on a photographic film, however, no matter which of the above correction methods is used for such corrections, it is still difficult to accurately correct each one of the various types of defect portions.
The present invention was conceived in view of the above. It is a first object of the present invention to provide an image processing device, an image processing method, and a recording medium capable of accurately correcting all of various types of defect portions.
It is a second object of the present invention to provide an image processing device, an image processing method, and a recording medium capable of suppressing inconsistency in the correction accuracy when defects are corrected by the interpolation method.
It is a third object of the present invention to provide an image processing device, an image processing method, and a recording medium capable of improving the correction accuracy when correcting defect portions by the brightness adjustment method.